<?php
class InfoAction extends MbaseAction {
	public $tbname = 'Info';
	public $obj = '';
	public $mpk = 'info_id';
	public $cate = '';
	public function index(){
		$m = M('Info');
		$datalist = $m->order('info_id asc')->select();
		$this->assign('datalist',$datalist);
		$info_id = isset($_GET['info_id'])? $_GET['info_id']:0;
		$datainfo = $datalist[0];
		if($info_id){
			foreach($datalist as $vo){
				if($info_id == $vo['info_id']){
					$datainfo = $vo;
				}
			}
		}
		
		$this->assign('datainfo',$datainfo);
		$this->setSeo($datainfo['name'],$datainfo['keywords'],$datainfo['summary']);
		$this->display();
	}
}
?>